#include <stdio.h>
#include "lbiao.h"
#include <stdlib.h>

/*lbiao * chuhua_lbiao()
{
    lbiao * root = malloc(sizeof(*root));
    root->next = NULL;
    root->one = NULL;
    return root;
}*/



lbiao * zheng_jied(lbiao * root ,lbiao * p)
{

    if(root == NULL)
    {
        return p;
    }
    if(p == NULL)
    {
        return root;
    }
    /*if(root->next == root)
    {
        root->next = p;
        p->next = root;
        root->one = p;
        p->one = root;
        root = p;
        return root;
    }*/

    p->next = root->next;
    root->next->one = p;
    root->next = p;
    p->one = root;
    root = p;
    return root;
}

void shuang_chu(lbiao * root)
{
    if(root == NULL)
    {
        return;
    }
    lbiao * s = root->next;
    root->next=NULL;
    root->one = NULL;
    free(root->data);
    free(root);
    shuang_chu(s);
}


